package com.syh.jn.scm.domain.downstream.event;

import com.syh.core.ddd.domain.DomainEvent;
import com.syh.jn.scm.domain.downstream.entity.finance.DownIncomeBill;
import com.syh.jn.scm.domain.upstream.event.UpIncomeBillEvent;

/**
 * 下游收入单事件
 */
public class DownIncomeBillEvent extends DomainEvent<DownIncomeBill> {
  public static final String DOWNSTREAM_INCOME_BILL_CREATE = "downstreamIncomeBillCreate";
  public static final String DOWNSTREAM_INCOME_BILL_DESTROY = "downstreamIncomeBillDestroy";
  public static final String DOWNSTREAM_INCOME_BILL_STATE_CONFIRM = "downstreamIncomeBillStateConfirm";
  public static final String DOWNSTREAM_INCOME_BILL_STATE_UN_CONFIRM = "downstreamIncomeBillStateUnConfirm";

  /**
   * 下游收入单创建事件
   *
   * @param values
   * @return
   */
  public static DownIncomeBillEvent buildCreate(Object[] values) {
    DownIncomeBillEvent downIncomeBillEvent = new DownIncomeBillEvent();
    downIncomeBillEvent.eventName = DOWNSTREAM_INCOME_BILL_CREATE;
    downIncomeBillEvent.values = values;
    return downIncomeBillEvent;
  }

  /**
   * 下游收入单销毁事件
   *
   * @param values
   * @return
   */
  public static DownIncomeBillEvent buildDestroy(Object[] values) {
    DownIncomeBillEvent downIncomeBillEvent = new DownIncomeBillEvent();
    downIncomeBillEvent.eventName = DOWNSTREAM_INCOME_BILL_DESTROY;
    downIncomeBillEvent.values = values;
    return downIncomeBillEvent;
  }

  /**
   * 下游收入单确认
   *
   * @param values
   * @return
   */
  public static DownIncomeBillEvent buildDownIncomeBillStateConfirmEvent(Object[] values) {
    DownIncomeBillEvent downstreamIncomeBillEvent = new DownIncomeBillEvent();
    downstreamIncomeBillEvent.eventName = DOWNSTREAM_INCOME_BILL_STATE_CONFIRM;
    downstreamIncomeBillEvent.values = values;
    return downstreamIncomeBillEvent;
  }

  /**
   * 下游收入单取消确认
   *
   * @param values
   * @return
   */
  public static DownIncomeBillEvent buildDownIncomeBillStateUnConfirmEvent(Object[] values) {
    DownIncomeBillEvent downstreamIncomeBillEvent = new DownIncomeBillEvent();
    downstreamIncomeBillEvent.eventName = DOWNSTREAM_INCOME_BILL_STATE_UN_CONFIRM;
    downstreamIncomeBillEvent.values = values;
    return downstreamIncomeBillEvent;
  }
}
